using DG.Tweening;
using UnityEngine;

public class DOTween3DObj : MonoBehaviour
{
    public GameObject mCuke;
    public int mValue;
    public Ease MCurEase;
    
    void Start()
    {
        mValue = 5;
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.X))
        {
            mCuke.transform.DOMoveX(5, 1);
            mValue += 5;
        }
        else if (Input.GetKeyDown(KeyCode.C))
        {
            mCuke.transform.DOMoveX(mValue, 1).SetEase(Ease.Linear).SetLoops(-1);
        }
        else if (Input.GetKeyDown(KeyCode.V))
        {
            mCuke.transform.DOMoveX(mValue, 1).OnComplete(() => { Debug.Log("End"); });
        }
        else if (Input.GetKeyDown(KeyCode.B))
        {
            mCuke.transform.DOMoveX(mValue, 1).OnStart(() => { Debug.Log("Start"); });
        }

    }
}
